use derive_builder::Builder;
use serde::{Deserialize, Serialize};
use model_graph_types::container::workflow::WorkflowModel;

//
#[derive(Debug, Default, Serialize, Deserialize, Clone, PartialEq)]
pub enum ApplicationAgentPromptType {
    #[default]
    #[serde(rename = "simple")]
    Simple,
}

#[derive(Debug, Default, Serialize, Deserialize, Clone, Builder)]
#[builder(name = "ApplicationModelConfigBuilder")]
#[builder(pattern = "mutable")]
#[builder(setter(into, strip_option), default)]
#[builder(derive(Debug))]
#[builder(build_fn(error = "anyhow::Error"))]
pub struct ApplicationModelConfig {
    pub pre_prompt: Option<String>,
    pub prompt_type: ApplicationAgentPromptType,
    pub model: Option<WorkflowModel>,
}

#[derive(Debug, Default, Serialize, Deserialize, Clone, Builder)]
#[builder(name = "ApplicationDocumentBuilder")]
#[builder(pattern = "mutable")]
#[builder(setter(into, strip_option), default)]
#[builder(derive(Debug))]
#[builder(build_fn(error = "anyhow::Error"))]
pub struct ApplicationDocument {
    pub model_config: ApplicationModelConfig,
}
